package com.xxgc.spring.service.impl;

import com.xxgc.spring.dao.UserDaoMapper;
import com.xxgc.spring.dao.impl.UserDao;
import com.xxgc.spring.service.IUserLoginService;

public class UserLoginService implements IUserLoginService {

    //和DAO层建立关系
    private UserDaoMapper udm;


    //set注入
    //public void setUdm(UserDaoMapper udm) {
    //    this.udm = udm;
    // }
    //构造方法注入
    public UserLoginService(UserDaoMapper udm) {
        this.udm = udm;
    }

    public UserLoginService(){
        System.out.println("我是翠花，我诞生了");
    }

    public int userLogin(String uName, String uPass) {
        if("zs".equals(uName) &&"123456".equals(uPass)){
            System.out.println("登陆成功");
        }else{
            System.out.println("登录失败");
        }
        return 0;
    }

    public int userRegister(String uName, String uPass) {
        return 0;
    }
}
